<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .damao {
            width: 200px;
            height: 150px;
            background-color: gray;
            float: left;
        }

        .ermao {
            width: 200px;
            height: 150px;
            background-color: pink;
            float: right;
        }

        .box {
            /* //清除浮动 这种方式简洁，无法显示出溢出部分*/
            overflow: hidden;
            width: 800px;
            border: solid 1px black;
        }

        /* 清除浮动 */
        .clear {
            clear: both;
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="damao">大毛</div>
        <div class="ermao">二毛</div>
        <!-- 加入盒子清除浮动 额外标签法 -->
        <!-- <div class="clear"></div> -->
    </div>
</body>

</html>